x=float(input("请输入月前收入:"))
b=5000
x_b=x-b
if x_b<=0:
    f=0
    print("实际个税{}".format(f))
elif x_b<=1500:
   f=x_b*0.03
   print("实际个税{}".format(f))
elif x_b<4500:
    f=(x_b-1500)*0.1+1500*0.03
    print("实际个税{}".format(f))
elif x_b<9000:
    f=(x_b-4500)*0.2+4500*0.2
    print("实际个税{}".format(f))
elif x_b<35000:
    f=(x_b-9000)*0.25+4500*0.2+3000*0.1+1500*0.03
    print("实际个税{}".format(f))
elif x_b<55000:
    f=(x_b-35000)*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
    print("实际个税{}".format(f))
elif x_b<80000:
    f=(x_b-55000)*0.35+20000*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
    print("实际个税{}".format(f))
else:
    f=(x_b-80000)*0.45+25000*0.35+20000*0.3+26000*0.25+4500*0.2+3000*0.1+1500*0.03
    print("实际个税{}".format(f))